#import "VividFlutterController.h"
        
#import "VividFlutterModel.h"
#import "VividFlutterCell.h"
#import "Masonry.h"

@interface VividFlutterController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *quixoticCollectionView;
@property (nonatomic, strong) NSMutableArray *oracleTransformPioneerDataSource;

@end

@implementation VividFlutterController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self mergeMergeOnwardInitview];
	[self hammerTerrainZestfulgetData];
}


//: 获取数据模型
- (void)hammerTerrainZestfulgetData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)oracleTransformPioneerDataSource {
	if (!_oracleTransformPioneerDataSource) {
		_oracleTransformPioneerDataSource = [NSMutableArray array];
	}
	return _oracleTransformPioneerDataSource;
}

//: 初始化页面UI
- (void)mergeMergeOnwardInitview {
	[self.view addSubview:self.quixoticCollectionView];
	[self.quixoticCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.edges.equalTo(self.view);
	}];
}


- (UICollectionView *)quixoticCollectionView {
    if (!_quixoticCollectionView) {
        UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
        flowLayout.minimumLineSpacing = 10;
        flowLayout.minimumInteritemSpacing = 10;
        flowLayout.itemSize = CGSizeMake(100, 100);
        flowLayout.scrollDirection = UICollectionViewScrollDirectionVertical;
        
        _quixoticCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:flowLayout];
        _quixoticCollectionView.backgroundColor = UIColor.clearColor;
        _quixoticCollectionView.delegate = self;
        _quixoticCollectionView.dataSource = self;
        _quixoticCollectionView.showsHorizontalScrollIndicator = NO;
        _quixoticCollectionView.showsVerticalScrollIndicator = NO;
        [_quixoticCollectionView registerClass:[VividFlutterCell class] forCellWithReuseIdentifier:NSStringFromClass([VividFlutterCell class])];
    }
    return _quixoticCollectionView;
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.oracleTransformPioneerDataSource.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    VividFlutterCell *rebirthXenonHaze = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([VividFlutterCell class]) forIndexPath:indexPath];
    return rebirthXenonHaze;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
